package com.moon.interface_api.controller;

import com.moon.interface_api.service.RandomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartHttpServletRequest;


@Controller
@RequestMapping("/random")
public class RandomAccessFileController {
    
    @Autowired
    private RandomService randomService;
    
    @RequestMapping("set")
    @ResponseBody
    public String file(MultipartHttpServletRequest file){
        randomService.upload(file);
        return "成功";
    }
}
